from django.db import models

# Create your models here.
class FaultTree(models.Model):
    # 故障树ID
    # 故障树名称
    name = models.CharField(max_length=64)
    # 故障树json
    json = models.JSONField()


class Probability(models.Model):
    # ID
    # 底事件名称
    target = models.CharField(max_length=64)
    # 底事件ID
    targetid = models.CharField(max_length=64)
    # 底事件概率
    probability = models.FloatField()
    # 关联的故障树ID
    tree = models.IntegerField()